(function() {
  'use strict';

  angular
    .module('lighter')
    .config(routerConfig);

  /** @ngInject */
  function routerConfig($stateProvider, $urlRouterProvider) {
    $urlRouterProvider.otherwise('/');

    $stateProvider
      .state('main', {
        url: '/',
        templateUrl: 'app/main/main.html',
        controller: 'MainController',
        controllerAs: 'main'
      })

      .state('topic', {
        url: '/topic/{id}',
        templateUrl: 'app/topic/topic.html',
        controller: 'TopicController',
        controllerAs: 'topic'
      })
  }

})();
